package com.wk.utils;

public class responseresult {
    //状态码
    private int status;

    public responseresult() {
    }

    //消息
    private String message;
    //返回数据
    private Object data;

    public int getStatus() {
        return status;
    }

    public responseresult(int status, String message, Object data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public static responseresult success(Object producttype) {
        return new responseresult(1, "succeed", producttype);
    }

    public static responseresult success() {
        return new responseresult(1, "succeed", null);
    }

    //失败
    public static responseresult failed() {
        return new responseresult(0, "failed", null);
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
